<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    var currentIndex = 5
    ++currentIndex
    console.log(currentIndex)
    --currentIndex
    console.log(currentIndex)

    currentIndex = 5
    var result1 = 100 + currentIndex++
    console.log(currentIndex) // 6
    console.log(result1) // 105

    currentIndex = 5
    var result2 = 100 + ++currentIndex
    console.log(currentIndex) // 6
    console.log(result2) // 106


  </script>
</body>

</html>